package com.xxxx.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.xxxx.entity.User;
import com.xxxx.mapper.UserMapper;
import com.xxxx.service.IUserService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangyan
 * @since 2017-08-06
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public User selectByLoginName(String loginName) {
        User user = new User();
        user.setUsername(loginName);
        return super.selectOne(new EntityWrapper<User>(user));
    }
}
